#include <fstream>
#include "Input.h"
#include "PO_MoM.h"
#include <iostream>
#include <cmath>
using namespace blitz;
void Initial()
{
	indata_Wire();
}
void indata_Wire()
{
	std::ifstream geo("geo_MoM.dat");
	if (!geo)
	{
		std::cerr<<"geo_MoM.dat file not open!"<<std::endl;
		exit(1);
	}

	double sX,sY,sZ,eX,eY,eZ;
	geo>>iWire>>sX>>sY>>sZ>>eX>>eY>>eZ>>WireRadius;
	vWire.resize(iWire);
	Position3D vStartPoint(sX,sY,sZ),vEndPoint(eX,eY,eZ);
	Position3D Delta = (vStartPoint-vEndPoint)/iWire;
	DeltaLength = sqrt(dot(Delta,Delta));
	for (int i=0; i<iWire; i++)
		vWire(i) = vEndPoint+(i+0.5)*Delta;	
	geo.close();
}
